from flask import g, render_template, request
from info import get_user_info
from . import profile_bp

@profile_bp.route('/base_info')
@get_user_info
def base_info():
    user = g.user
    if request.method == "GET":
        data = {
            "user_info": user.to_dict() if user else None
        }
    return render_template("user/user_base_info.html", data=data)



@profile_bp.route('/info')
@get_user_info
def user_info():
    user = g.user
    data = {
        "user_info": user.to_dict() if user else None
    }
    return render_template("user/user.html", data=data)